using Microsoft.AspNetCore.Mvc;

namespace Cngot.Extensions.DependencyInjection.WebApi.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class ValuesController : ControllerBase
    {
private readonly ITestService _testService;
        private readonly ILogger<ValuesController> _logger;

        public ValuesController(ILogger<ValuesController> logger,[FromKeyedServices("aaa")] ITestService testService)
        {
            _logger = logger;
            _testService = testService;
        }

        [HttpGet(Name = "GetWeatherForecast")]
        public Task<string> Get()
        {
            return Task.FromResult(_testService.Test());
        }
    }
}
